#ifndef NETGLOBAL_H
#define NETGLOBAL_H

#include <QString>

enum ReqId
{
    ID_GET_VARIFY_CODE  = 1001, //获取验证吗
    ID_REG_USER         = 1002, //用户注册
    ID_RESET_PWD        = 1003, //重置密码
    ID_LOGIN_USER       = 1004, //用户登录
    ID_CHAT_LOGIN       = 1005, //登录聊天服务器
    ID_CHAT_LOGIN_RSP   = 1006, //登录聊天服务器回包
};

enum Modules
{
    REGISTER_MOD = 0,   //注册模块 - RegisterDialog
    RESET_MOD = 1,      //重置密码模块 - ResetDialog
    LOGIN_MOD = 2,      //登录模块 - LoginDialog
};

enum ErrorCode
{
    SUCCESS     = 0,
    ERR_JSON    = 1,            //json解析失败
    ERR_NETWORK = 2,            //网络错误
    ERR_CALL_BCLK_fAILED = 3,   //没有对应的回调函数
};

enum TipErr
{
    TIP_SUCCESS = 0,
    TIP_EMAIL_ERR = 1,
    TIP_PWD_ERR = 2,
    TIP_CONFIRM_ERR = 3,
    TIP_PWD_CONFIRM = 4,
    TIP_VARIFY_ERR = 5,
    TIP_USER_ERR = 6
};

enum ClickLbState
{
    Normal = 0,  //密码可见
    Selected = 1 //密码不可见
};

// 服务器返回的登录信息
struct ServerInfo
{
    QString Host;
    QString Port;
    QString Token;
    uint32_t Id;
};

#endif // NETGLOBAL_H
